<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="module">
        import {consoleprint} from "./modules/first.js"

        consoleprint("MAP创建")
        let m1 = new Map();
        let arr1= [1,2]

        m1.set(arr1,"123"); // todo key 可以不是字符串
        console.log(m1);
        m1.delete(arr1);
        console.log(m1.size) // 0

        m1.clear()
        m1.set("123",arr1)
        console.log(m1.has("123")) // true
        console.log(m1.has(arr1)) // false

        console.log(m1.get("123")) // arr1[1,2]
        console.log(m1.get(arr1)); //undefind

        for(let [k,v] of m1.entries()){
            console.log(`key:${k},value:${v}`)
        }

    </script>
</head>
<body>

</body>
</html>